c# create default instance of type

67

c# create default instance of type -

public object GetDefaultValue(Type type)
{
    return type.IsValueType ? Activator.CreateInstance(type) : null;
} 

Comments

Submit
0 Comments